package com.chenwenxuan.sync.console.model;


public class Task {
	
	private String taskName;
	private int taskId = -1;
	private String taskType;
	private String freq;
	private String startTime;
	private String lastExecute;
	private boolean debugEnable;
	private boolean testEnable;
	
	private boolean runInWorkDay;
	private String executeGroup;

	private int scheduleType;
	
	private String cronExpression;
	private int maxRetry;
	private int currentRetry;
	private int retryType;
	
	private int condType;
	private String condText;
	private int executeOrder;

	private int catalogId;
	
	public String getTaskName() {
		return taskName;
	}

	public void setTaskName(String taskName) {
		this.taskName = taskName;
	}

	public String getFreq() {
		return freq;
	}

	public void setFreq(String freq) {
		this.freq = freq;
	}

	public String getStartTime() {
		return startTime;
	}

	public void setStartTime(String startTime) {
		this.startTime = startTime;
	}

	public int getTaskId() {
		return taskId;
	}

	public void setTaskId(int taskId) {
		this.taskId = taskId;
	}

	public String getTaskType() {
		return taskType;
	}

	public void setTaskType(String taskType) {
		this.taskType = taskType;
	}

	public int getScheduleType() {
		return scheduleType;
	}

	public void setScheduleType(int scheduleType) {
		this.scheduleType = scheduleType;
	}

	public String getCronExpression() {
		return cronExpression;
	}

	public void setCronExpression(String cronExpression) {
		this.cronExpression = cronExpression;
	}

	public String getLastExecute() {
		return lastExecute;
	}

	public void setLastExecute(String lastExecute) {
		this.lastExecute = lastExecute;
	}
	
	public boolean isCron() {
		return isCron(this.scheduleType);
	}

	public boolean isDebugEnable() {
		return debugEnable;
	}

	public void setDebugEnable(boolean debugEnable) {
		this.debugEnable = debugEnable;
	}

	public static boolean isCron(int scheduleType) {
		return scheduleType != 0;
	}

	public boolean isTestEnable() {
		return testEnable;
	}

	public void setTestEnable(boolean testEnable) {
		this.testEnable = testEnable;
	}
	
	public boolean isRunInWorkDay() {
		return runInWorkDay;
	}

	public void setRunInWorkDay(boolean runInWorkDay) {
		this.runInWorkDay = runInWorkDay;
	}

	public String getExecuteGroup() {
		return executeGroup;
	}

	public void setExecuteGroup(String executeGroup) {
		this.executeGroup = executeGroup;
	}
	
	public int getMaxRetry() {
		return maxRetry;
	}

	public void setMaxRetry(int maxRetry) {
		this.maxRetry = maxRetry;
	}

	public int getCurrentRetry() {
		return currentRetry;
	}

	public void setCurrentRetry(int currentRetry) {
		this.currentRetry = currentRetry;
	}

	public int getRetryType() {
		return retryType;
	}

	public void setRetryType(int retryType) {
		this.retryType = retryType;
	}

	public int getCondType() {
		return condType;
	}

	public void setCondType(int condType) {
		this.condType = condType;
	}

	public String getCondText() {
		return condText;
	}

	public void setCondText(String condText) {
		this.condText = condText;
	}

	public int getExecuteOrder() {
		return executeOrder;
	}

	public void setExecuteOrder(int executeOrder) {
		this.executeOrder = executeOrder;
	}

	public int getCatalogId() {
		return catalogId;
	}

	public void setCatalogId(int catalogId) {
		this.catalogId = catalogId;
	}

}
